home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Vampire the Masquerade / vampire_demo.exe / Codex.nob / DisciplineHeartOfStone.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  1.6 KB  |  32 lines

  1. public class DisciplineHeartOfStone extends Discipline {
  2.    private static final String DISCIPLINE_NAME = "HeartOfStone";
  3.  
  4.    public int cast(int level, int casterGuid) {
  5.       if (!((Discipline)this).CheckCastParameters(level, casterGuid, "HeartOfStone")) {
  6.          return 0;
  7.       } else if (((Discipline)this).Fizzled(level)) {
  8.          ((Discipline)this).DisplayFizzle("HeartOfStone", level);
  9.          return 0;
  10.       } else {
  11.          try {
  12.             int effectGuid = super.casterThing.FindActorEffect("ef_disc_heartofstone");
  13.             if (effectGuid != 0) {
  14.                super.casterThing.ExpandActorEffect(effectGuid, Discipline.HEARTOFSTONE_DURATIONS[level], false);
  15.                ((Discipline)this).DisplayRecast("HeartOfStone", level);
  16.             } else {
  17.                super.casterThing.AddActorEffectByLevel("ef_disc_heartofstone", Discipline.HEARTOFSTONE_DURATIONS[level], level, casterGuid, 4);
  18.                ((Discipline)this).DisplayCast("HeartOfStone", level);
  19.             }
  20.  
  21.             return 1;
  22.          } catch (Exception var5) {
  23.             CodexConsole.PrintException(((Throwable)var5).getMessage() + " in " + "HeartOfStone" + " [cast]");
  24.             return 0;
  25.          } catch (Error var6) {
  26.             CodexConsole.PrintError(((Throwable)var6).getMessage() + " in " + "HeartOfStone" + " [cast]");
  27.             return 0;
  28.          }
  29.       }
  30.    }
  31. }
  32.